package day1;

/**
 * ClassName：Test4
 *final与return
 * @Author：小鱼
 * @Create：2025-08-18 14:14
 */
public class Test4 {
    public static void main(String[] args) {
        int r = getNum(10,0);
        //int r = getNum(new Integer(10),new Integer(10));
        System.out.println("r: "+r);
    }
    public static int getNum(int a,int b){
        int n = 0;
        try {
            n = a/b;
        }catch (Exception e){
            e.printStackTrace();
            n = 20;
            return n;
        }finally {
            n = 30;
            System.out.println("final:"+n);
        }
       return n;
    }
//    public static int getNum(Integer a,Integer b){
//
//    }
}
